package org.csmzxy.class2333;

import java.util.HashSet;
import java.util.Iterator;

public class Example08 {
    public static void main(String[] args){
        HashSet<Student> set = new HashSet<>();
        set.add(new Student("01","张三"));
        set.add(new Student("02","李四"));
        set.add(new Student("02","李四"));
        Iterator<Student> iterator = set.iterator();
        while (iterator.hasNext()){
            Student student = iterator.next();
            System.out.println(student.toString());
        }
    }
}
